﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DelonixRegiaHMSys.Core.Services;
using DelonixRegiaHMSys.Infrastructure.Data;

namespace DelonixRegiaHMSys.UI.WebForms
{
    public partial class GuestCreditCardDetail : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btngccdnext_Click(object sender, EventArgs e)
        {
            string GuestID = lblguestID.Text;
            string CreditCardNum = tbxcreditCardNum.Text;
            string CardHolderName = tbxcardHolderName.Text;
            string CardType = ddlcardType.SelectedValue;
            DateTime CardExpirationDate = Convert.ToDateTime( tbxexpiretime.Text);

            var gccdservice = new gccdServices(new EfGuestCreditCardDetails());
            gccdservice.AddCreditCardDetail(CreditCardNum, CardHolderName, GuestID, CardType, CardExpirationDate);

            Response.Redirect("~/WebForms/RetrieveGuestCreditCardDetails.aspx", true);
        }
    }
}